feat(buffer): add some new function bindings.#33
Merged
TheSpyder merged 2 commits intoTheSpyder:mainfrom Mar 15, 2025
Merged
Conversation
- readBig(U)Int64(BE/LE) - subarray(ToEnd) NOTE: Buffer.slice is now deprecated (since node 16.x LTS) Refs. ======= - https://nodejs.org/docs/latest-v16.x/api/buffer.html#bufslicestart-end
muqiuhan
commented
Jan 19, 2025
| external readUintLE: (t, ~offset: int, ~length: int) => float = "readUintLE" | ||
|
|
||
| @send | ||
| external readBigInt64BE: (t, ~offset: int) => bigint = "readBigInt64BE" |
Contributor
Author
There was a problem hiding this comment.
CI says there are compilation errors here:
We've found a bug for you!
/home/runner/work/rescript-nodejs/rescript-nodejs/src/Buffer.res:276:47-52
274 │
275 │ @send
276 │ external readBigInt64BE: (t, ~offset: int) => bigint = "readBigInt64BE
│ "
277 │
278 │ @send
This type constructor, `bigint`, can't be found.
If you wanted to write a recursive type, don't forget the `rec` in `type rec`But rescript 11.1 already treats bigint as primitive type: Primitive Types | Big Integer.
Maybe it's because the rescript version in the devDependencies of the current project is 11.0.1:
"devDependencies": {
"rescript": "^11.0.1",
},
Owner
There was a problem hiding this comment.
Yes, this repo is quite out of date, feel free to upgrade.
Owner
Feel free to add an |
5a82174 to
447f398
Compare
- Upgrade rescript to v11.1.0 - Add rescript.json configuration file - Mark Buffer.slice methods as deprecated in favor of subarray methods - Update Cluster module classification logic
Contributor
Author
|
Hello, I have fixed the CI bug (upgraded rescript to ^11.1.0) and added some @deprecated annotations~ |
Owner
|
Thank you! I'll look at it soon |
TheSpyder
approved these changes
Mar 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: Buffer.slice is now deprecated (since node 16.x LTS)
Refs.